package com.geilizu.dom.dao;

import com.geilizu.dom.dto.SearchDoAdminDto;
import com.geilizu.dom.entity.DormitoryAdmin;
import com.geilizu.dom.entity.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * (Student)表数据库访问层
 *
 * @author makejava
 * @since 2022-07-12 17:42:43
 */
public interface StudentDao {
    /**
     * 通过宿舍id查询学生列表
     * @param id
     * @return
     */
    List<Student> queryByDormitoryId(Integer id);


    /**
     * 根据id查询宿舍id
     * @param id
     * @return
     */
    Integer queryDoId(@Param("id") Integer id);

    List<Student> queryAll(@Param("page") Integer page, @Param("size") Integer size);

    Long queryAllCount();

    List<Student> search(SearchDoAdminDto searchDoAdminDto);

    Long searchCount(SearchDoAdminDto search);

    Integer deleteById(Integer id);

    Integer updateById(Student student);

    boolean save(Student student);

    Student findById(Integer id);
}

